<%@ page import="domain.Product" %><%--
  Created by IntelliJ IDEA.
  User: 86147
  Date: 2024/5/6
  Time: 20:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>处理添加商品</title>

</head>
<body>
<!-- 引入JavaBean，自动匹配表单输入域名称并设置值 -->
<jsp:useBean id="product" class="domain.Product" scope="request">
    <jsp:setProperty property="*" name="product"/>
</jsp:useBean>
<!-- 调用JavaBean的add方法添加产品信息 -->
<%
    boolean isAdded = product.add(product);
    if(isAdded){
        response.sendRedirect(request.getContextPath() +
                "/WebContent/admin/login/home.jsp?item=product_list");
    }
%>
</body>
</html>
